<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        class Person {
            constructor(name, age) {
                this.name = name;
                this.age = age;
            }
            showName(){
                alert(this.name);
            }
            showAge(){
                alert(this.age);
            }
        }

        let p = new Person('chen', 21);

        p.showName();
        p.showAge();

    </script>

</head>
<body>

</body>
</html>